home *** CD-ROM | disk | FTP | other *** search
- property eventLists, titleField, titleFieldName, ScrollBar, savedTitle
-
- on catchEvent me, xEventNum
- set thisEventList to getAt(eventLists, xEventNum)
- changeTitle(me, getProp(thisEventList, #title))
- changeCopy(me, getProp(thisEventList, #copy))
- end
-
- on stringEvent me, xString
- changeTitle(me, xString)
- set copyMember to member (xString && "copy")
- changeCopy(me, copyMember)
- end
-
- on new me, xTitleField, xScrollBar
- set eventLists to []
- set titleField to xTitleField
- set titleFieldName to the name of titleField
- set ScrollBar to xScrollBar
- set savedTitle to the text of titleField
- return me
- end
-
- on addThing me, xThing
- set thisTitle to string(getType(xThing))
- set copyName to thisTitle && "copy"
- set thisCopy to member copyName
- case thisTitle of
- "Guanine":
- set thisTitle to "Guanin"
- "Cytosine":
- set thisTitle to "Cytosin"
- "Thymine":
- set thisTitle to "Thymin"
- "DNA and Mutations":
- set thisTitle to "DNA und Mutationen"
- "Adenine":
- set thisTitle to "Adenin"
- otherwise:
- nothing()
- end case
- add(eventLists, [#title: thisTitle, #copy: thisCopy])
- return count(eventLists)
- end
-
- on cleanUp me
- changeTitle(me, savedTitle)
- cleanUp(ScrollBar)
- end
-
- on changeTitle me, xString
- set the text of titleField to xString
- end
-
- on changeCopy me, xMember
- newMember(ScrollBar, xMember)
- end
-